package com.yupi.cli.command;

import cn.hutool.core.io.FileUtil;
import picocli.CommandLine;

import java.io.File;
import java.lang.reflect.Field;
import java.util.List;

/**
 * 遍历输出所有要生成的文件列表
 */
@CommandLine.Command(name = "list", description = "查看要生成的文件列表", mixinStandardHelpOptions = true)
public class ListCommand implements Runnable{
    @Override
    public void run() {
        String projectPath = System.getProperty("user.dir") + File.separator + "hezi-generator-basic";
        File parentPath = new File(projectPath).getParentFile();
        String inputPath = new File(parentPath,"acm-template").getAbsolutePath();
        List<File> list = FileUtil.loopFiles(inputPath);
        for(File file : list){
            System.out.println(file);
        }
    }
}
